import {loginRequest,request} from '@/network/request'

let baseURL = '/api/admin'

export function lockAdmin(data){
    return request({
        url: baseURL + '/lock-admin',
        method: 'post',
        data: data
    })
}

export function login(data){
    return loginRequest({
        url: baseURL + '/login',
        method: 'post',
        params: data
    })
}

export function logout(){
    return request({
        url: '/myLogout',
        method: 'post'
    })
}

export function userList(data){
    return request({
        url: baseURL + '/list',
        method: 'post',
        data: data
    })
}

export function userSearch(data){
    return request({
        url: '/user/search',
        method: 'get',
        data: data
    })
}

export function userAdd(data){
    return request({
        url: baseURL + '/add-admin',
        method: 'post',
        data: data
    })
}